



<fieldset class="layui-elem-field layui-field-title" >
    <legend>订单信息</legend>
</fieldset>
<!-- TODO 备注一下
//这里显示的是近7天订单的完成状况。目前是最后处理完所有订单的话，都会是中间的待完成待发货，都是0-->
<!--//是否应该显示当天订单的固定值。例如有多少张单是当天完成的。-->


<div class="layui-form">
    <table class="layui-table">
        <colgroup>
            <col >
            <col>
            <col>
        </colgroup>
        <thead>
        <tr>
            <th>学校</th>
            <th>本月订单数</th>
            <th>本月订单金额</th>
            <th>总订单数</th>
            <th>总订单金额</th>
        </tr>
        </thead>
        <tbody>

        <? for($i=0;$i<count($school_list);$i++){?>
            <tr>
                <td><?echo $school_list[$i]['name']?></td>



                <?
                    $_fiinance_price_list=transform_2darray_in_1darray_number_as_key($finance_1month[$i],"order_price");
                    $sum_month = '0';
                    foreach ($_fiinance_price_list as $price) {
                        $sum_month = bcadd($sum_month, $price, 2); // 精确到小数点后两位
                    }
                    ;?>
                <td><?echo $order_month_amount[]=count($finance_1month[$i])?> 单  </td>
                <td><?echo $order_month_sum[]=$sum_month?>元</td>


                <?
                    $_all_fiinance_price_list = array_map('strval', transform_2darray_in_1darray_number_as_key($finance[$i], "order_price"));
                    $sum = '0';
                    foreach ($_all_fiinance_price_list as $price) {
                        $sum = bcadd($sum, $price, 2);
                    }
                    ?>

                <td><?echo $order_amount[]=count($finance[$i])?></td>
                <td><?echo $order_sum[]=$sum?>元</td>


            </tr>
        <?}?>

        <tr>
            <td>合计</td>
            <td><?echo array_sum($order_month_amount)?></td>
            <td><?echo array_sum($order_month_sum)?></td>
            <td><?echo array_sum($order_amount)?></td>
            <td><?echo array_sum($order_sum)?></td>
        </tr>



        </tbody>
    </table>
</div>